/*
 * @Desc: 普通用户api
 * @author cheegon
 * @date 2024/7/3  上午9:33
**/
import { apiGet, apiPost } from '@/config/apiConfig'

export const reqDeleteComment = (id) => apiGet(`/comments/delete/${ id }`)
/**
 * 添加留言
 * @param params
 * @returns {Promise | Promise<unknown>}
 */
export const reqAddMessage = (params) => apiPost('/message/addMessage', params)
/**
 * 编辑留言
 * @param params
 * @returns {Promise | Promise<unknown>}
 */
export const reqEditMessage = (params) => apiPost('/message/editMessage', params)
/**
 * 删除留言
 * @param id
 * @returns {Promise | Promise<unknown>}
 */
export const reqDelMessage = (id) => apiGet(`/message/delMessage/${ id }`)
/**
 * 添加评论
 * @param params
 * @returns {Promise | Promise<unknown>}
 */
export const reqAddComment = (params) => apiPost('/consumer/comment/add', params)
/**
 * 编辑评论
 * @param params
 * @returns {Promise | Promise<unknown>}
 */
export const reqEditComment = (params) => apiPost('/consumer/comment/edit', params)
/**
 * 删除评论
 * @param id
 * @returns {Promise | Promise<unknown>}
 */
export const reqDelComment = (id) => apiGet(`/consumer/comment/del/${ id }`)
